package com.behavior.visitor.example.visitor.impl;

import com.behavior.visitor.example.user.impl.Student;
import com.behavior.visitor.example.user.impl.Teacher;
import com.behavior.visitor.example.visitor.Visitor;

/**
 * <p></p>
 *
 * @author jiuhua.xu
 * @version 1.0
 * @since JDK 1.8
 */
public class Principal implements Visitor {

    @Override
    public void visit(Student student) {
        System.out.printf("\r\n学生信息 姓名：%s 班级：%s", student.name, student.clazz);
    }

    @Override
    public void visit(Teacher teacher) {
        System.out.printf("\r\n老师信息 姓名：%s 班级：%s 升学率：%s", teacher.name, teacher.clazz, teacher.entranceRatio());
    }
}
